import 'dart:convert';
import 'package:enterprise_v6_app/app/data/common/choice_bean.dart';
import 'package:enterprise_v6_app/generated/json/base/json_field.dart';
import 'package:enterprise_v6_app/generated/json/base_risk_object_entity.g.dart';
export 'package:enterprise_v6_app/generated/json/base_risk_object_entity.g.dart';

/// 隐患排查-分析对象实体类
@JsonSerializable()
class BaseRiskObjectEntity extends ChoiceBean {
  BaseRiskObjectEntity();

  factory BaseRiskObjectEntity.fromJson(Map<String, dynamic> json) => $BaseRiskObjectEntityFromJson(json);

  ///企业编码
  String? companyCode = '';

  ///
  String? createBy = '';

  ///
  String? createById = '';

  ///
  String? createDate = '';

  ///
  String? deleted = '';

  ///	描述
  String? description = '';

  ///	重大危险源编码
  String? hazardCode = '';

  ///	责任部门：风险分析对象所属部门名称
  String? hazardDep = '';

  ///	责任部门id：风险分析对象所属部门的id
  String? hazardDepId = '';

  ///	辨识部门
  String? hazardDistinguishDep = '';

  ///	辨识部门编号
  String? hazardDistinguishDepId = '';

  ///	辨识人
  String? hazardDistinguishPerson = '';

  ///
  String? hazardDistinguishPersonId = '';

  ///	责任人：风险分析对象所属部门负责人姓名
  String? hazardLiablePerson = '';

  ///
  String? hazardLiablePersonId = '';

  ///
  String? hazardRank = '';

  ///
  String? id = '';

  ///
  int? level = 0;

  /// 审批状态 0：待发起 1：待审批 2：审批中 3：通过 4：驳回
  int? checkType = 0;

  ///	重大危险源名称
  String? riskObjectName = '';

  ///
  int? status = 0;

  ///
  String? updateBy = '';

  ///
  String? updateById = '';

  ///
  String? updateDate = '';

  ///	日常任务类型
  String? workType = '';

  Map<String, dynamic> toJson() => $BaseRiskObjectEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }

  @override
  String getId() {
    return id!;
  }

  @override
  String getShowName() {
    return riskObjectName!;
  }
}
